package com.artPreter.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.artPreter.pojo.Floor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.artPreter.pojo.vos.page.FloorPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.conditions.Wrapper;

/**
 * <p>
 * 楼层表 Mapper 接口
 * </p>
 *
 * @author Jarvis_He
 * @since 2024-04-22
 */
@Mapper
public interface FloorMapper extends BaseMapper<Floor> {

    /**
     * 楼层分页
     * @param floorPageVOIPage
     * @param wrapper
     * @return
     */
    @Select("select s.*,b.posi_name as posiName,b.indoor as indoor,s.loc_w as loc_w, s.loc_h as loc_h from jv_floor s left join jv_position b on s.position = b.uuid ${ew.customSqlSegment}")
    IPage<FloorPageVO> getPage(IPage<FloorPageVO> floorPageVOIPage, @Param(Constants.WRAPPER) Wrapper wrapper);
}
